import request from '@/router/axios';
import  qs from  'qs'

export const delRowGener = (id) => { // 单个删除
  return request({
    url: '/api/blade-public/dictCommon/deleteDict',
    method: 'post',
    params: {
      id,
    }
  })
}

export const addRowGener = (row) => { // 新增
  row.parentid =row.parentid == ''? 0:row.parentid
  return request({
    url: '/api/blade-public/dictCommon/saveDict',
    method: 'post',
    data: row
  })
}

export const saveRowGener = (row) => { // 更新(保存)
  return request({
    url: '/api/blade-public/dictCommon/saveDict',
    method: 'post',
    data:row
  })
}

export const editRowGener = (data) => { // 编辑
  return request({
    url: '/api/blade-public/dictCommon/editDict',
    method: 'post',
    data: data
  })
}

export const queryDictGener = (params) => { // 查询
  return request({
    url: '/api/blade-public/dictCommon/queryDict',
    method: 'post',
    data:params
  })
}

